package file;

import java.io.File;
import java.io.FileFilter;

public class text6 {
    public static void main(String[] args) {
        File dir = new File(".");
        if(dir.isDirectory()){
           /* File [] arr=dir.listFiles(new FileFilter() {
                @Override
                public boolean accept(File pathname) {


                    return pathname.getName().contains("s");
                }
            });

            */
            File []arr=dir.listFiles(file ->file.getName().contains("s"));

            for(File str:arr){
                System.out.println(str);
            }
        }
    }
}
